// import Cookies from 'js-cookie'

const TokenKey = 'chat_web_token:access_token'
const RefreshTokenKey = 'chat_web_token:refresh_token'

export function getTokenAtStorage() {
  return sessionStorage.getItem(TokenKey)
}

export function setTokenAtStorage(token) {
   sessionStorage.setItem(TokenKey, token)
}

export function getRefreshTokenAtStorage() {
  return sessionStorage.getItem(RefreshTokenKey)
}

export function setRefreshTokenAtStorage(refresh_token) {
   sessionStorage.setItem(RefreshTokenKey, refresh_token)
}

export function removeTokens() {
  sessionStorage.removeItem(TokenKey)
  sessionStorage.removeItem(RefreshTokenKey)
}


